<% title t('strategies.plural') %>
<% page_new new_strategy_path %>

<div class="subtitle">
  <%= t('strategies.index.subtitle') %>
</div>

<div class="spacer"></div>

<% if @strategies.length > 0 %>
  <%= render :partial => '/search/posts', locals: { data_type: 'strategy' } %>

  <%= render :partial => '/shared/stats', locals: { data_type: 'strategy' } %>

  <div id="pages">
    <div class="page">
    <%= render @strategies %>
    </div>
  </div>

  <%= paginate @strategies %>
<% else %>
  <%= raw t('strategies.index.instructions', {
      icon: '<i class="fa fa-plus-circle"></i>'
    }) %>

  <div class="actions align_right">
    <%= button_to t('common.actions.add'), premade_strategies_path %>
  </div>

  <div class="clear"></div>

  <div id="pages">
    <div class="page">
      <div class="strategy no_margin_bottom">
        <h1 class="strategy_name">
          <%= content_tag(:span, '<i class="fa fa-lock"></i>'.html_safe, class: 'yes_title small_margin_right', title: t('comment.control')) %>
          <%= t('strategies.index.premade1_name') %>
        </h1>

        <%= strip_tags(t('strategies.index.premade1_description')[0..80]) %>
        <% if t('strategies.index.premade1_description').length >= 80 %>
          <%= t('ellipsis') %>
        <% end %>
      </div>
    </div>
  </div>
<% end %>
